import Vue from 'vue'
import App from './App'
import store from './store'

// #ifndef VUE3
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createStore } from 'vuex'
import user from './store/user'

export function createApp() {
	const app = createSSRApp(App)
	
	// 创建Vuex store
	const store = createStore({
		modules: {
			user
		}
	})
	
	app.use(store)
	
	return {
		app
	}
}
// #endif
